package com.jcl.recruit.basic.register.model;

import com.jcl.core.utils.StringUtils;
import com.jcl.recruit.console.model.ConsoleCorpInfo;
import com.jcl.recruit.console.model.ConsoleUserAccess;
import com.jcl.recruit.corp.model.Subcompany;
import com.jcl.recruit.org.model.Department;
import com.jcl.recruit.user.model.User;

/**
 * @ClassName RegisterResult
 * @Author yyliu
 * @Date 2018/9/14 11:35
 * @Version 1.0
 **/
public class RegisterResult {

    protected String errorMsg;

    protected String code;

    protected String corpCode;

    protected Integer userId;

    protected ConsoleUserAccess userAccess;

    protected ConsoleCorpInfo consoleCorpInfo;

    public boolean hasError(){
        if(StringUtils.hasLength(this.code)){
           return RegisterResultContent.hasError(this.code);
        }
        return false;
    }

    public String getErrorMsg() {
        if(StringUtils.hasLength(this.code)){
            errorMsg = RegisterResultContent.getMsg(this.code);
        }
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getCorpCode() {
        return corpCode;
    }

    public void setCorpCode(String corpCode) {
        this.corpCode = corpCode;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public ConsoleUserAccess getUserAccess() {
        return userAccess;
    }

    public void setUserAccess(ConsoleUserAccess userAccess) {
        this.userAccess = userAccess;
    }

    public ConsoleCorpInfo getConsoleCorpInfo() {
        return consoleCorpInfo;
    }

    public void setConsoleCorpInfo(ConsoleCorpInfo consoleCorpInfo) {
        this.consoleCorpInfo = consoleCorpInfo;
    }
}
